from gameworld import GW

class BlockType:
    colors = {
        "L": GW.COLOR_GREEN,
        "S": GW.COLOR_YELLOW,
        "Z": GW.COLOR_BLUE,
        "J": GW.COLOR_PURPLE,
        "I": GW.COLOR_YELLOW_GREEN,
        "T": GW.COLOR_LIGHT_BLUE,
        "O": GW.COLOR_ORANGE
    }

    images = {
        "L": "blue.png",
        "S": "red.png",
        "Z": "yellow.png",
        "J": "purple.png",
        "I": "cyan.png",
        "T": "green.png",
        "O": "orange.png",
    }

    types = [
        {
            "name": "L",
            "color": colors.get("L"),
            "data": [
                [ 0, 1, 0, 0],
                [ 0, 1, 0, 0],
                [ 0, 1, 1, 0],
                [ 0, 0, 0, 0]
            ]
        },
        {
            "name": "S",
            "color": colors.get("S"),
            "data": [
                [ 0, 1, 0, 0],
                [ 0, 1, 1, 0],
                [ 0, 0, 1, 0],
                [ 0, 0, 0, 0]
            ]
        },
        {
            "name": "Z",
            "color": colors.get("Z"),
            "data": [
                [ 0, 0, 0, 0],
                [ 1, 1, 0, 0],
                [ 0, 1, 1, 0],
                [ 0, 0, 0, 0]
            ]
        },
        {
            "name": "J",
            "color": colors.get("J"),
            "data": [
                [ 0, 0, 1, 0],
                [ 0, 0, 1, 0],
                [ 0, 1, 1, 0],
                [ 0, 0, 0, 0]
            ]
        },
        {
            "name": "I",
            "color": colors.get("I"),
            "data": [
                [ 0, 1, 0, 0],
                [ 0, 1, 0, 0],
                [ 0, 1, 0, 0],
                [ 0, 1, 0, 0]
            ]
        },
        {
            "name": "T",
            "color": colors.get("T"),
            "data": [
                [ 0, 1, 0, 0],
                [ 0, 1, 1, 0],
                [ 0, 1, 0, 0],
                [ 0, 0, 0, 0]
            ]
        },
        {
            "name": "O",
            "color": colors.get("O"),
            "data": [
                [ 0, 0, 0, 0],
                [ 0, 1, 1, 0],
                [ 0, 1, 1, 0],
                [ 0, 0, 0, 0]
            ]
        },
    ]
